<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head> 
   <meta charset="UTF-8">
   <%@ include file="/WEB-INF/views/include/head.jsp"%>
   <link rel="stylesheet" href="${ctxStatic}/css/common_erp.css">
   <link rel="stylesheet" href="${ctxStatic}/css/layerSm.css">
   <script src="${ctxStatic}/js/jquery-1.9.1.min.js"></script>
   <script src="${ctxStatic}/js/layer.js"></script>
   <script src="${ctxStatic}/js/style.js"></script>
   <script src="${ctxStatic}/jquery-barcode/jquery-barcode.js" type="text/javascript"></script>
   <script type="text/javascript">   
	$(document).ready(function(){		
		//$("#inventoryRequestBarCodeDiv").empty().barcode($("#stockBarCode").val(), "code128",{barWidth:2, barHeight:30,showHRI:false});
	});
	
    /* 刷新明细  */
    function requestDetailsList() {
  	    var id = $("#id").val();
    	param={"id":id};
    	$.post("${ctx}/slopwork/inbound/show",param,function(result){ 
        	$("#tableRequestDetails").html($(callBackHtml(result)).find("#tableRequestDetails").html());
        },'html');
	}
    
 	function closeThisWin() {
 		window.parent.frames[0].searchListForm();
		closeWin();
	}
	</script>
</head>
<body>
<div class="layerHeader clearfix">
	<p class="headerTitle"><spring:message code="slopworkInbound_show_head" /></p>
    <div class="headerButton clearfix">
        <!-- 取消 -->
        <button onclick="closeThisWin()"><spring:message code="inventory_detail_set_close" /></button>
    </div>
</div>
<form id="inputForm" method="post">
<input type="hidden" id="id" name="id" value="${slopworkInbound.id}"/>
<input type="hidden" id="stockBarCode" name="stockBarCode" value="${slopworkInbound.stockBarCode}">
<div class="smOrderBox">
    <div class="items clearfix">
        <div class="col-33 clearfix" id="divInventoryRequestNo">
            <!-- 入库单号 -->
            <p class="tit"><spring:message code="slopworkInRequest_show_inventoryRequestNo" /></p>
            <p>${slopworkInbound.inventoryRequestNo}</p>
        </div>
        <div class="col-66 clearfix">
            <!-- 入库类别 -->
            <p class="tit"><spring:message code="slopworkInRequest_show_inventoryCategory" /></p>
            <p>${fns:getDictName(slopworkInbound.inventoryCategory)}</p>
        </div>      
    </div>
    <c:set value="<%=ResourcesUtil.getConfig(\"clothes_in_category_processing\")%>" var="varClothesInProcessing" />
    <c:set value="<%=ResourcesUtil.getConfig(\"clothes_in_category_production\")%>" var="varClothesInProduction" />
    <div class="items clearfix">
        <c:choose>
            <c:when test="${slopworkInbound.inventoryCategory eq varClothesInProduction }">
                <div class="col-33 clearfix">
                    <!-- 生产制单号 -->
                    <p class="tit" style="width:75px;"><spring:message code="slopworkInRequest_show_production" /></p>
                    <p>${slopworkInbound.productionNo}</p>
                </div>
                <div class="col-33 clearfix" id="divCustomerContractNo">
                    <!-- 客户订单号 -->
                    <p class="tit"><spring:message code="slopworkInRequest_show_customerContractNo" /></p>
                    <p>${slopworkInbound.customerContractNo}</p>
                </div>
            </c:when>
            <c:when test="${slopworkInbound.inventoryCategory eq varClothesInProcessing}">
                <div class="col-33 clearfix">
                    <!-- 加工厂名称 -->
                    <p class="tit"><spring:message code="slopworkInRequest_show_fabricatName" /></p>
                    <p>${slopworkInbound.fabricatName}</p>
                </div>
                <div class="col-33 clearfix" id="divContractProcessId">
                    <!-- 外发合同订单  -->
                    <p class="tit" style="width:75px;"><spring:message code="slopworkInRequest_show_process" /></p>
                    <p>${slopworkInbound.contractProcessNo}</p>
                </div>
            </c:when>
        </c:choose>
        <div class="col-33 clearfix" id="divStyleId">
            <!-- 款式 -->
            <p class="tit"><spring:message code="slopworkInRequest_show_style" /></p>
            <p>${slopworkInbound.customerStyleNo}</p>
        </div>
    </div>
</div>
<div class="tableArea">
    <div class="tableScrollSm" style="overflow:auto;width:925px;height:440px;">
        <table cellpadding="0" class="tableHead">
            <thead>
            <tr>
                <!-- 操作 -->
                <th class="tab-ddcz"><spring:message code="inventory_request_create_details_operate" /></th>
                <!-- 客户订单号 -->
                <th><p class="width-250px"><spring:message code="slopworkInRequest_show_list_customerContractNo" /></p></th>
                <!-- 颜色-->
                <th><p class="width-120px"><spring:message code="slopworkInRequest_show_list_color" /></p></th>
                <!-- 尺码 -->
                <th><p class="width-120px"><spring:message code="slopworkInRequest_show_list_size" /></p></th>
                <!-- 订单数量 -->
                <th><p class="width-120px"><spring:message code="slopworkInRequest_show_list_indentQuantity" /></p></th>
                <!-- 申请入库数量 -->
                <th><p class="width-120px"><spring:message code="inventory_request_create_details_requestQuantity" /></p></th>
                <!-- 入库数量-->
                <th><p class="width-120px"><spring:message code="inventory_request_create_details_realQuantity" /></p></th>
            </tr>
            </thead>
        </table>
        <table cellpadding="0" class="tableBody" id="tableRequestDetails">
        <c:if test="${not empty slopworkInbound.requestDetailsList}">
            <tbody>
            <c:forEach items="${slopworkInbound.requestDetailsList}" var="requestDetailsInfo" varStatus="status">
            <tr>
                <!-- 操作 -->
                <td class="tab-ddcz"><img src="${ctxStatic}/images/btn-bj.png" onclick="popup('880px','519px','${ctx}/slopwork/inbound/inventoryClothesDetail?inventoryRequestDetailId=${requestDetailsInfo.inventoryRequestDetailId}')" height="30" width="30"></td>
                <!-- 客户订单号 -->
                <td><p class="width-250px">${requestDetailsInfo.customerContractNo}</p></td>
                <!-- 颜色-->
                <td><p class="width-120px">${requestDetailsInfo.styleColor}</p></td>
                <!-- 尺码 -->
                <td><p class="width-120px">${fns:getDictName(requestDetailsInfo.styleSize)}</p></td>
                <!-- 订单数量 -->
                <td><p class="width-120px"><fmt:formatNumber value="${requestDetailsInfo.indentQuantity}" pattern="#,##0"/></p></td>
                <!-- 申请入库数量-->
                <td><p class="width-120px"><fmt:formatNumber value="${requestDetailsInfo.requestQuantity}" pattern="#,##0.###"/></p></td>
                <!-- 实际入库数量-->
                <td><p class="width-120px"><fmt:formatNumber value="${requestDetailsInfo.realQuantity}" pattern="#,##0.###"/></p></td>
            </tr>
            </c:forEach>
            </tbody>
        </c:if>    
        </table>
    </div>
</div>
</form>
</body>
</html>